using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Clanta.Core.Domain;
using NHibernate;
using Clanta.Web.BusinessLogic;
using System.Collections.Generic;

namespace Clanta.Web.Controls
{
    public partial class UserList : System.Web.UI.UserControl
    {
        #region Life Cycle

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        #endregion

        #region Public Methods

        public void ShowForCustomer(Customer customer)
        {
            CustomerUsersSqlDataSource.SelectParameters.Clear();
            CustomerUsersSqlDataSource.SelectParameters.Add("CustomerId", customer.Id.ToString());

            UserGridView.DataSourceID = CustomerUsersSqlDataSource.ID;
            UserGridView.DataBind();
        }

        #endregion
    }
}